package com.zw.data.mp.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * ORM  面向对象的方法操作数据库
 * ORM  表名对应类名
 *
 * @author zhangwei
 */
@Data
@TableName("pms_product")
public class Product {
    /**
     * 主键
     */
    @TableId(value = "product_id", type = IdType.ASSIGN_ID)
    private Long productId;

    /**
     * 商品名称
     */
    @TableField("product_name")
    private String productName;

    /**
     * 商品图片 多张图片使用,隔开
     */
    @TableField("product_img")
    private String productImg;

    /**
     * 商品参考价格
     */
    @TableField("product_price")
    private BigDecimal productPrice;
    /**
     *
     */
    @TableField("create_date")
    private Date createDate;

    /**
     * 1 正常  0 删除
     */
    @TableField("status")
    @TableLogic(value = "1", delval = "0")
    private Integer status;

    @Version
    private int version;

    public static final String COL_PRODUCT_NAME = "product_name";
    public static final String COL_PRODUCT_ID = "product_id";
    public static final String COL_STATUS = "status";
    public static final String COL_PRODUCT_PRICE = "product_price";
    public static final String COL_CREATE_DATE = "create_date";

}